Export the gtk_private_signals and gtk_private_n_signals variables, they
authorTor Lillqvist <tml@iki.fi>
Thu, 13 Apr 2000 21:29:11 +0000 (21:29 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 13 Apr 2000 21:29:11 +0000 (21:29 +0000)
2000-04-14  Tor Lillqvist  <tml@iki.fi>

* gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and
gtk_private_n_signals variables, they are used by some software,
sigh.

* gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32:) Fetch the
installation directory from the Registry, where the installer
should have put it.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkrc.c
gtk/gtksignal.c

index 9bb3559e9250e7620b38408edf9a59f214ca9252..3cbf8fa93d27b26750099b4e73bdeb9ec7aa3d80 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2000-04-14  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and
+       gtk_private_n_signals variables, they are used by some software,
+       sigh.
+
+       * gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32:) Fetch the
+       installation directory from the Registry, where the installer
+       should have put it.
+
 Fri Apr  7 17:19:27 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/Makefile.am: Fix problem with installation directory for
index 9bb3559e9250e7620b38408edf9a59f214ca9252..3cbf8fa93d27b26750099b4e73bdeb9ec7aa3d80 100644 (file)
@@ -1,3 +1,13 @@
+2000-04-14  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and
+       gtk_private_n_signals variables, they are used by some software,
+       sigh.
+
+       * gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32:) Fetch the
+       installation directory from the Registry, where the installer
+       should have put it.
+
 Fri Apr  7 17:19:27 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/Makefile.am: Fix problem with installation directory for
index 9bb3559e9250e7620b38408edf9a59f214ca9252..3cbf8fa93d27b26750099b4e73bdeb9ec7aa3d80 100644 (file)
@@ -1,3 +1,13 @@
+2000-04-14  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and
+       gtk_private_n_signals variables, they are used by some software,
+       sigh.
+
+       * gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32:) Fetch the
+       installation directory from the Registry, where the installer
+       should have put it.
+
 Fri Apr  7 17:19:27 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/Makefile.am: Fix problem with installation directory for
index 9bb3559e9250e7620b38408edf9a59f214ca9252..3cbf8fa93d27b26750099b4e73bdeb9ec7aa3d80 100644 (file)
@@ -1,3 +1,13 @@
+2000-04-14  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and
+       gtk_private_n_signals variables, they are used by some software,
+       sigh.
+
+       * gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32:) Fetch the
+       installation directory from the Registry, where the installer
+       should have put it.
+
 Fri Apr  7 17:19:27 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/Makefile.am: Fix problem with installation directory for
index 9bb3559e9250e7620b38408edf9a59f214ca9252..3cbf8fa93d27b26750099b4e73bdeb9ec7aa3d80 100644 (file)
@@ -1,3 +1,13 @@
+2000-04-14  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and
+       gtk_private_n_signals variables, they are used by some software,
+       sigh.
+
+       * gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32:) Fetch the
+       installation directory from the Registry, where the installer
+       should have put it.
+
 Fri Apr  7 17:19:27 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/Makefile.am: Fix problem with installation directory for
index 9bb3559e9250e7620b38408edf9a59f214ca9252..3cbf8fa93d27b26750099b4e73bdeb9ec7aa3d80 100644 (file)
@@ -1,3 +1,13 @@
+2000-04-14  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and
+       gtk_private_n_signals variables, they are used by some software,
+       sigh.
+
+       * gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32:) Fetch the
+       installation directory from the Registry, where the installer
+       should have put it.
+
 Fri Apr  7 17:19:27 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/Makefile.am: Fix problem with installation directory for
index 9bb3559e9250e7620b38408edf9a59f214ca9252..3cbf8fa93d27b26750099b4e73bdeb9ec7aa3d80 100644 (file)
@@ -1,3 +1,13 @@
+2000-04-14  Tor Lillqvist  <tml@iki.fi>
+
+       * gtk/gtksignal.c: (Win32:) Export the gtk_private_signals and
+       gtk_private_n_signals variables, they are used by some software,
+       sigh.
+
+       * gtk/gtkrc.c (get_gtk_sysconf_directory): (Win32:) Fetch the
+       installation directory from the Registry, where the installer
+       should have put it.
+
 Fri Apr  7 17:19:27 2000  Owen Taylor  <otaylor@redhat.com>
 
        * gdk/x11/Makefile.am: Fix problem with installation directory for
index cf97c48ae848f64bec42e0797f0af8be16eade8b..aed1588f01bd3c04b9b5fc1da37752bc8fdc04ee 100644 (file)
@@ -251,22 +251,38 @@ static GtkImageLoader image_loader = NULL;
 gchar *
 get_gtk_sysconf_directory (void)
 {
+  static gboolean been_here = FALSE;
   static gchar gtk_sysconf_dir[200];
   gchar win_dir[100];
+  HKEY reg_key = NULL;
+  DWORD type;
+  DWORD nbytes = sizeof (gtk_sysconf_dir);
+
+  if (been_here)
+    return gtk_sysconf_dir;
+
+  been_here = TRUE;
+
+  if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, "Software\\GNU\\GTk+", 0,
+                   KEY_QUERY_VALUE, &reg_key) != ERROR_SUCCESS
+      || RegQueryValueEx (reg_key, "InstallationDirectory", 0,
+                         &type, gtk_sysconf_dir, &nbytes) != ERROR_SUCCESS
+      || type != REG_SZ)
+    {
+      /* Uh oh. Use the old hard-coded %WinDir%\GTk+ value */
+      GetWindowsDirectory (win_dir, sizeof (win_dir));
+      sprintf (gtk_sysconf_dir, "%s\\gtk+", win_dir);
+    }
+
+  if (reg_key != NULL)
+    RegCloseKey (reg_key);
 
-  GetWindowsDirectory (win_dir, sizeof (win_dir));
-  sprintf (gtk_sysconf_dir, "%s\\gtk+", win_dir);
   return gtk_sysconf_dir;
 }
 
 static gchar *
 get_themes_directory (void)
 {
-  /* We really should fetch this from the Registry. The GIMP
-   * installation program stores the Themes installation
-   * directory in HKLM\Software\GNU\GTk+\Themes\InstallDirectory.
-   * Later.
-   */
   static gchar themes_dir[200];
 
   sprintf (themes_dir, "%s\\themes", get_gtk_sysconf_directory ());
index 97ea7cf1d49bb0afbbee1cef56d83e9af79e5f37..00326f483ddd8a79d0e031ae1220e6286e0eb44f 100644 (file)
@@ -177,8 +177,13 @@ static GtkSignalDestroy global_destroy_notify = NULL;
 static guint                    gtk_handler_id = 1;
 static guint                    gtk_handler_quark = 0;
 static GHashTable              *gtk_signal_hash_table = NULL;
-       GtkSignal               *_gtk_private_signals = NULL;
-       guint                    _gtk_private_n_signals = 0;
+#ifdef G_OS_WIN32
+#define EXPORT __declspec(dllexport)
+#else
+#define EXPORT
+#endif
+EXPORT GtkSignal               *_gtk_private_signals = NULL;
+EXPORT guint                    _gtk_private_n_signals = 0;
 static GMemChunk               *gtk_signal_hash_mem_chunk = NULL;
 static GMemChunk               *gtk_disconnect_info_mem_chunk = NULL;
 static GtkHandler              *gtk_handler_free_list = NULL;